package com.ourteam.system.service;

/**
 *
 * Template Name : 业务服务实现基类
 * Template Version : 1
 * Template Last Modfiy Date : Mon Nov 06 10:52:01 CST 2017
 * Auto Generate Date : 2018-07-20 12:04:37
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


abstract class AbstractSysUserService extends net.service.DefaultServiceImpl
    implements ISysUserService {
    protected static final Log logger = LogFactory.getLog(AbstractSysUserService.class);

    /**
     * SysUser DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserDAO sysUserDao;

    /**
     * SysUserRoleRelate DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserRoleRelateDAO sysUserRoleRelateDao;

    /**
     *  SysRoleService Instance
    */
    protected com.ourteam.system.service.ISysRoleService sysRoleService;

    /**
     * SysUserLoginLog DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserLoginLogDAO sysUserLoginLogDao;

    /**
     * SysUserSetting DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserSettingDAO sysUserSettingDao;

    /**
     *  SystemEventLogService Instance
    */
    protected com.ourteam.system.service.ISystemEventLogService systemEventLogService;

    /**
     * SysUserPhoto DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserPhotoDAO sysUserPhotoDao;

    /**
         *  Get SysUser DAO Instance
         */
    public com.ourteam.system.dao.ISysUserDAO getSysUserDao() {
        return sysUserDao;
    }

    /**
         *  Set SysUser DAO Instance
         */
    public void setSysUserDao(com.ourteam.system.dao.ISysUserDAO aDao) {
        sysUserDao = aDao;
    }

    /**
         *  Get SysUserRoleRelate DAO Instance
         */
    public com.ourteam.system.dao.ISysUserRoleRelateDAO getSysUserRoleRelateDao() {
        return sysUserRoleRelateDao;
    }

    /**
         *  Set SysUserRoleRelate DAO Instance
         */
    public void setSysUserRoleRelateDao(
        com.ourteam.system.dao.ISysUserRoleRelateDAO aDao) {
        sysUserRoleRelateDao = aDao;
    }

    /**
         *  Get SysRoleService Instance
        */
    public com.ourteam.system.service.ISysRoleService getSysRoleService() {
        return sysRoleService;
    }

    /**
     *  Set SysRoleService Instance
    */
    public void setSysRoleService(
        com.ourteam.system.service.ISysRoleService aService) {
        sysRoleService = aService;
    }

    /**
         *  Get SysUserLoginLog DAO Instance
         */
    public com.ourteam.system.dao.ISysUserLoginLogDAO getSysUserLoginLogDao() {
        return sysUserLoginLogDao;
    }

    /**
         *  Set SysUserLoginLog DAO Instance
         */
    public void setSysUserLoginLogDao(
        com.ourteam.system.dao.ISysUserLoginLogDAO aDao) {
        sysUserLoginLogDao = aDao;
    }

    /**
         *  Get SysUserSetting DAO Instance
         */
    public com.ourteam.system.dao.ISysUserSettingDAO getSysUserSettingDao() {
        return sysUserSettingDao;
    }

    /**
         *  Set SysUserSetting DAO Instance
         */
    public void setSysUserSettingDao(
        com.ourteam.system.dao.ISysUserSettingDAO aDao) {
        sysUserSettingDao = aDao;
    }

    /**
         *  Get SystemEventLogService Instance
        */
    public com.ourteam.system.service.ISystemEventLogService getSystemEventLogService() {
        return systemEventLogService;
    }

    /**
     *  Set SystemEventLogService Instance
    */
    public void setSystemEventLogService(
        com.ourteam.system.service.ISystemEventLogService aService) {
        systemEventLogService = aService;
    }

    /**
         *  Get SysUserPhoto DAO Instance
         */
    public com.ourteam.system.dao.ISysUserPhotoDAO getSysUserPhotoDao() {
        return sysUserPhotoDao;
    }

    /**
         *  Set SysUserPhoto DAO Instance
         */
    public void setSysUserPhotoDao(com.ourteam.system.dao.ISysUserPhotoDAO aDao) {
        sysUserPhotoDao = aDao;
    }

    /**
     * 查询系统用户
    
     * @param aQueryBean
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUser[] doGetSysUsers(
        final com.ourteam.system.dao.SysUserDAOQueryBean aQueryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUser[] getSysUsers(
        final com.ourteam.system.dao.SysUserDAOQueryBean aQueryBean)
        throws Exception {
        try {
            com.ourteam.system.domain.SystemUser[] result = doGetSysUsers(aQueryBean);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUsers error", e);
            throw e;
        }
    }

    /**
     * 查询系统用户数量
    
     * @param aQueryBean
    
     * @throws Exception
     */
    protected abstract int doGetSysUserCount(
        final com.ourteam.system.dao.SysUserDAOQueryBean aQueryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public int getSysUserCount(
        final com.ourteam.system.dao.SysUserDAOQueryBean aQueryBean)
        throws Exception {
        try {
            int result = doGetSysUserCount(aQueryBean);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUserCount error", e);
            throw e;
        }
    }

    /**
     * 创建系统用户
    
     * @param systemUser
    
     * @throws Exception
     */
    protected abstract void doCreateSysUser(
        final com.ourteam.system.domain.SystemUser systemUser)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void createSysUser(
        final com.ourteam.system.domain.SystemUser systemUser)
        throws Exception {
        try {
            if (systemUser == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [systemUser] Value is NULL");
            }

            doCreateSysUser(systemUser);
        } catch (Exception e) {
            logger.error("do createSysUser error", e);
            throw e;
        }
    }

    /**
     * 修改系统用户
    
     * @param systemUser
    
     * @throws Exception
     */
    protected abstract void doModifySysUser(
        final com.ourteam.system.domain.SystemUser systemUser)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void modifySysUser(
        final com.ourteam.system.domain.SystemUser systemUser)
        throws Exception {
        try {
            if (systemUser == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [systemUser] Value is NULL");
            }

            doModifySysUser(systemUser);
        } catch (Exception e) {
            logger.error("do modifySysUser error", e);
            throw e;
        }
    }

    /**
     * 变更用户密码
    
     * @param aSystemUserPassword
    
     * @throws Exception
     */
    protected abstract void doChangeUserPassword(
        final com.ourteam.system.domain.SystemUserPassword aSystemUserPassword)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void changeUserPassword(
        final com.ourteam.system.domain.SystemUserPassword aSystemUserPassword)
        throws Exception {
        try {
            if (aSystemUserPassword == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [aSystemUserPassword] Value is NULL");
            }

            doChangeUserPassword(aSystemUserPassword);
        } catch (Exception e) {
            logger.error("do changeUserPassword error", e);
            throw e;
        }
    }

    /**
     * 根据帐号取得用户信息
    
     * @param aAccount
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUser doGetSysUserByAccount(
        final String aAccount) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUser getSysUserByAccount(
        final String aAccount) throws Exception {
        try {
            if (aAccount == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [aAccount] Value is NULL");
            }

            com.ourteam.system.domain.SystemUser result = doGetSysUserByAccount(aAccount);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUserByAccount error", e);
            throw e;
        }
    }

    /**
     * 根据ID取得系统用户信息
    
     * @param aSystemUserId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUser doGetSysUserById(
        final long aSystemUserId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUser getSysUserById(
        final long aSystemUserId) throws Exception {
        try {
            com.ourteam.system.domain.SystemUser result = doGetSysUserById(aSystemUserId);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUserById error", e);
            throw e;
        }
    }

    /**
     * 取得用户密码信息
    
     * @param aAccount
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUserPassword doGetSysUserPassword(
        final String aAccount) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUserPassword getSysUserPassword(
        final String aAccount) throws Exception {
        try {
            if (aAccount == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [aAccount] Value is NULL");
            }

            com.ourteam.system.domain.SystemUserPassword result = doGetSysUserPassword(aAccount);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUserPassword error", e);
            throw e;
        }
    }

    /**
     * 设置系统用户权限
    
     * @param aSysUserId
    
     * @param aSystemUserAuthorities
    
     * @throws Exception
     */
    protected abstract void doSetSysUserAuthorities(final long aSysUserId,
        final com.ourteam.system.domain.SystemUserRoleRelate[] aSystemUserAuthorities)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void setSysUserAuthorities(final long aSysUserId,
        final com.ourteam.system.domain.SystemUserRoleRelate[] aSystemUserAuthorities)
        throws Exception {
        try {
            doSetSysUserAuthorities(aSysUserId, aSystemUserAuthorities);
        } catch (Exception e) {
            logger.error("do setSysUserAuthorities error", e);
            throw e;
        }
    }

    /**
     * 取得用户权限设置
    
     * @param aSysUserId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUserRoleRelate[] doGetSysUserAuthorities(
        final long aSysUserId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUserRoleRelate[] getSysUserAuthorities(
        final long aSysUserId) throws Exception {
        try {
            com.ourteam.system.domain.SystemUserRoleRelate[] result = doGetSysUserAuthorities(aSysUserId);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUserAuthorities error", e);
            throw e;
        }
    }

    /**
     * 删除系统用户
    
     * @param sysUserIds
    
     * @param operatorId
    
     * @throws Exception
     */
    protected abstract void doDeleteSysUsers(final long[] sysUserIds,
        final long operatorId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void deleteSysUsers(final long[] sysUserIds, final long operatorId)
        throws Exception {
        try {
            doDeleteSysUsers(sysUserIds, operatorId);
        } catch (Exception e) {
            logger.error("do deleteSysUsers error", e);
            throw e;
        }
    }

    /**
     * 根据ID数组取得系统用户
    
     * @param sysUserId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUser[] doGetSysUsersByIds(
        final long[] sysUserId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUser[] getSysUsersByIds(
        final long[] sysUserId) throws Exception {
        try {
            com.ourteam.system.domain.SystemUser[] result = doGetSysUsersByIds(sysUserId);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUsersByIds error", e);
            throw e;
        }
    }

    /**
     * 重置用户密码
    
     * @param sysUserId
    
     * @param password
    
     * @throws Exception
     */
    protected abstract void doResetSysUserPassword(final long sysUserId,
        final String password) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void resetSysUserPassword(final long sysUserId, final String password)
        throws Exception {
        try {
            doResetSysUserPassword(sysUserId, password);
        } catch (Exception e) {
            logger.error("do resetSysUserPassword error", e);
            throw e;
        }
    }

    /**
     * 增加系统用户登录日志
    
     * @param sysUserLoginLogBean
    
     * @throws Exception
     */
    protected abstract void doAddSysUserLoginLog(
        final com.ourteam.system.domain.SysUserLoginLogBean sysUserLoginLogBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void addSysUserLoginLog(
        final com.ourteam.system.domain.SysUserLoginLogBean sysUserLoginLogBean)
        throws Exception {
        try {
            if (sysUserLoginLogBean == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [sysUserLoginLogBean] Value is NULL");
            }

            doAddSysUserLoginLog(sysUserLoginLogBean);
        } catch (Exception e) {
            logger.error("do addSysUserLoginLog error", e);
            throw e;
        }
    }

    /**
     * 跟新系统用户登录日志
    
     * @param sysUserLoginLogBean
    
     * @throws Exception
     */
    protected abstract void doModifySysUserLoginLog(
        final com.ourteam.system.domain.SysUserLoginLogBean sysUserLoginLogBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void modifySysUserLoginLog(
        final com.ourteam.system.domain.SysUserLoginLogBean sysUserLoginLogBean)
        throws Exception {
        try {
            if (sysUserLoginLogBean == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [sysUserLoginLogBean] Value is NULL");
            }

            doModifySysUserLoginLog(sysUserLoginLogBean);
        } catch (Exception e) {
            logger.error("do modifySysUserLoginLog error", e);
            throw e;
        }
    }

    /**
     * 根据会话ID取得登录日志
    
     * @param userId
    
     * @param sessionId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SysUserLoginLogBean doGetSysUserLoginLogBySessionId(
        final long userId, final String sessionId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SysUserLoginLogBean getSysUserLoginLogBySessionId(
        final long userId, final String sessionId) throws Exception {
        try {
            com.ourteam.system.domain.SysUserLoginLogBean result = doGetSysUserLoginLogBySessionId(userId,
                    sessionId);

            return result;
        } catch (Exception e) {
            logger.error("do getSysUserLoginLogBySessionId error", e);
            throw e;
        }
    }

    /**
     * 查询系统用户登录日志
    
     * @param queryBean
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SysUserLoginLogBean[] doQuerySysUserLoginLog(
        final com.ourteam.system.dao.SysUserLoginLogDAOQueryBean queryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SysUserLoginLogBean[] querySysUserLoginLog(
        final com.ourteam.system.dao.SysUserLoginLogDAOQueryBean queryBean)
        throws Exception {
        try {
            com.ourteam.system.domain.SysUserLoginLogBean[] result = doQuerySysUserLoginLog(queryBean);

            return result;
        } catch (Exception e) {
            logger.error("do querySysUserLoginLog error", e);
            throw e;
        }
    }

    /**
     * 查询系统用户登录日志数量
    
     * @param queryBean
    
     * @throws Exception
     */
    protected abstract int doQuerySysUserLoginLogCount(
        final com.ourteam.system.dao.SysUserLoginLogDAOQueryBean queryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public int querySysUserLoginLogCount(
        final com.ourteam.system.dao.SysUserLoginLogDAOQueryBean queryBean)
        throws Exception {
        try {
            int result = doQuerySysUserLoginLogCount(queryBean);

            return result;
        } catch (Exception e) {
            logger.error("do querySysUserLoginLogCount error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param userId
    
     * @param itemName
    
     * @param value
    
     * @throws Exception
     */
    protected abstract void doSetUserSetting(final long userId,
        final String itemName, final String value) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void setUserSetting(final long userId, final String itemName,
        final String value) throws Exception {
        try {
            if (itemName == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [itemName] Value is NULL");
            }

            doSetUserSetting(userId, itemName, value);
        } catch (Exception e) {
            logger.error("do setUserSetting error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param userId
    
     * @param itemName
    
     * @throws Exception
     */
    protected abstract String doGetUserSetting(final long userId,
        final String itemName) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public String getUserSetting(final long userId, final String itemName)
        throws Exception {
        try {
            if (itemName == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [itemName] Value is NULL");
            }

            String result = doGetUserSetting(userId, itemName);

            return result;
        } catch (Exception e) {
            logger.error("do getUserSetting error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param userPhoto
    
     * @throws Exception
     */
    protected abstract void doSetUserPhoto(
        final com.ourteam.system.domain.SysUserPhotoBean userPhoto)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void setUserPhoto(
        final com.ourteam.system.domain.SysUserPhotoBean userPhoto)
        throws Exception {
        try {
            if (userPhoto == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [userPhoto] Value is NULL");
            }

            doSetUserPhoto(userPhoto);
        } catch (Exception e) {
            logger.error("do setUserPhoto error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param userId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SysUserPhotoBean doGetUserPhoto(
        final long userId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SysUserPhotoBean getUserPhoto(
        final long userId) throws Exception {
        try {
            com.ourteam.system.domain.SysUserPhotoBean result = doGetUserPhoto(userId);

            return result;
        } catch (Exception e) {
            logger.error("do getUserPhoto error", e);
            throw e;
        }
    }
}
